<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>店铺模板列表页  - ${web.name}${web.additionalTitle!}</title>
<link href="${root}/u/css/main.css" type="text/css" rel="stylesheet" />
<link href="${root}/u/css/memeber.css" type="text/css" rel="stylesheet" />
<script src="${sysResRoot}/jquery.js" type="text/javascript"></script>
<script src="${base}/thirdparty/swfupload/swfupload.js" type="text/javascript"></script>
<script src="${base}/thirdparty/swfupload/swfupload.queue.js" type="text/javascript"></script>
<script src="${base}/thirdparty/swfupload/fileprogress.js" type="text/javascript"></script>
<script src="${base}/thirdparty/swfupload/handlers.js" type="text/javascript"></script>
<link href="${base}/thirdparty/swfupload/process.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript">
$(function() {
	$("#jvForm").validate();
});

var swfu;
window.onload=function() {
	var uploadUrl = "o_swfupload.jspx";
	//在firefox、chrome下，上传不能保留登录信息，所以必须加上jsessionid。
	var jsessionid = $.cookie("JSESSIONID");
	if(jsessionid) {
		uploadUrl += ";jsessionid="+jsessionid;
	}
	swfu=new SWFUpload({
		upload_url : uploadUrl,
		flash_url : "${base}/thirdparty/swfupload/swfupload.swf",
		file_size_limit : "100 MB",
		post_params: {"roott" : "${roott}"},
		file_types : "*.html",
		file_types_description : "Html Files",
		file_queue_limit : 0,
		custom_settings : {
			progressTarget : "fsUploadProgress",
			cancelButtonId : "btnCancel"
		},
		debug: false,
		
		button_image_url : "${base}/thirdparty/swfupload/button_notext.png",
		button_placeholder_id : "spanButtonPlaceHolder",
		button_text: "&nbsp;<@s.m "resource.upload"/>",
		button_width: 61,
		button_height: 22,
		
		file_queued_handler : fileQueued,
		file_queue_error_handler : fileQueueError,
		file_dialog_complete_handler : fileDialogComplete,
		upload_start_handler : uploadStart,
		upload_progress_handler : uploadProgress,
		upload_error_handler : uploadError,
		upload_success_handler : uploadSuccess,
		upload_complete_handler : uploadComplete,
		queue_complete_handler : queueComplete2
	});
};
function queueComplete2(numFilesUploaded) {
	//刷新页面
	location.href="list.jspx?roott=${roott}";
}
</script>
</head>
<body>
<form class="fl">
	<input type="hidden" name="roott" value="${roott}"/>&nbsp;
	<input type="submit" value="创建文件" onclick="this.form.action='add.jspx';" class="menu_ok2"/>
</form>
<a href="${base}/store/index.jspx" target="_blank" class="menu_ok2 fl" style="display:block; margin-left:10px; line-height:20px; color:#000;">返回卖家中心</a>
<div class="clear20"></div>
<form method="post" enctype="multipart/form-data">
	<input type="hidden" name="roott" value="${roott}"/>
  <table border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td>当前目录：${roott}</td>
    <td width="70" align="center"><span id="spanButtonPlaceHolder"></span></td>
    <td><input id="btnCancel" type="button" value="取消" onclick="swfu.cancelQueue();" disabled="disabled" class="menu_ok" /></td>
    <td>
    &nbsp; 新建目录： 
    <input type="text" name="dirName" size="10" class="address_input" onkeypress="if(event.keyCode==13){$('#dirButton').click();return false;}"/>
    <input id="dirButton" type="submit" value="新建" class="menu_ok" onclick="this.form.method='post';this.form.action='o_create_dir.jspx';"/>
    </td>
    </tr>
    <tr><td colspan="4"><div id="fsUploadProgress"></div></td></tr>
    </table>
</form>
<div class="clear20"></div>  
<table width="100%" border="0" cellspacing="1" cellpadding="2" bgcolor="#CCCCCC">
  <tr>
    <td width="30" height="30" align="center" bgcolor="#f0f0f0">
    <input type='checkbox' onclick='Pn.checkbox("names",this.checked)'/>
    </td>
    <td width="340" align="center" bgcolor="#f0f0f0">文件名</td>
    <td width="200" align="center" bgcolor="#f0f0f0">大小</td>
    <td width="200" align="center" bgcolor="#f0f0f0">最后修改时间</td>
    <td align="center" bgcolor="#f0f0f0">操作选项</td>
  </tr>
</table>

<table cellspacing="1" cellpadding="2" width="100%" border="0">
<#if list?size &gt; 0>
<#list list as template>
<tr>
<td width="30" height="50" align="center"><input type='checkbox' name='names' value='/WEB-INF/t/cms/www/default'/></td>
<td width="40" align="center"><img src="${base}/res/common/img/file/${template.directory?string('folder','html')}.gif"/></td>
<td width="300">${template.filename}</td>
<td width="200" align="center">${template.size!0}KB</td>
<td width="200" align="center">${template.lastModifiedDate?string('yyyy-MM-dd HH:mm:ss')}</td>
<td align="center">
<a href="rename.jspx?roott=${roott?url}&name=${template.name?url}" class="pn-opt">重命名</a>|
<a [#if !template.directory]href="edit.jspx?roott=${roott?url}&name=${template.name?url}" class="pn-opt"[#else]disabled="disabled"[/#if]>修改</a></a> | 
<a href="o_delete_single.jspx?roott=${roott?url}&name=${template.name?url}" onclick="if(!confirm('您确定删除吗？')) {return false;}" class="pn-opt">删除</a></td>
</tr>
<tr>
<td height="1" colspan="6" bgcolor="#e7e7e7"></td>
</tr>
</#list>
</#if>
</table>
<div class="clear"></div>
</body>
</html>